net: hns3: change default tc state to close
authorJian Shen <shenjian15@huawei.com>
Thu, 20 Dec 2018 03:51:59 +0000 (11:51 +0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 18 Jul 2019 22:23:17 +0000 (23:23 +0100)
In original codes, default tc value is set to the max tc. It's more
reasonable to close tc by changing default tc value to 1. Users can
enable it with lldp tool when they want to use tc.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gbp-Pq: Topic bugfix/arm64/huawei-taishan
Gbp-Pq: Name 0023-net-hns3-change-default-tc-state-to-close.patch

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 79232f584531b7868c0912edac6f762e7d522fc1..8cc08ffee76fbc05bb4ddb805c3d17560c2d4558 100644 (file)
@@ -1201,7 +1201,7 @@ static int hclge_configure(struct hclge_dev *hdev)
                hdev->pfc_max = hdev->tc_max;
        }
 
-       hdev->tm_info.num_tc = hdev->tc_max;
+       hdev->tm_info.num_tc = 1;
 
        /* Currently not support uncontiuous tc */
        for (i = 0; i < hdev->tm_info.num_tc; i++)